<?php
namespace app\controller;

use app\BaseController;
use hg\apidoc\annotation as Apidoc;

#[Apidoc\Title("基础示例")]
class Index extends BaseController
{
    #[
        Apidoc\Title("基础的演示"),
        Apidoc\Method("GET"),
        Apidoc\Query(name:"name",type: "string",require: true,desc: "姓名"),
    ]
    public function index()
    {
        $data = [
            'url' => request()->url(),
            'method'=>request()->method(),
            'name' => request()->param('name'),
        ];
        return json($data);
    }

    
}
